﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
<body>
    <a href="JsonHandler.ashx">DataContractJsonSerializer</a>
    <br />
    <a href="javascript:call();">Web Service</a>
    <script src="jquery-1.4.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function call() {
            // 使用 get 方式调用 json 服务
$.ajax(
{
    url: "WebService.asmx/HelloWorld",
    type: "get",
    dataType: "json",
    contentType: "application/json; charset=utf-8",
    success: function (json) {
        alert(json.d.percent);
    }
}
);
        }
            
            

    </script>
</body>
</html>
